package longshu.data.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import longshu.data.common.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * Teacher
 *
 * @author LongShu 2018/01/18
 */
@Getter
@Setter
@Accessors(chain = true)
@Entity(name = "teacher")
public class Teacher extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @Column(name = "number", unique = true, nullable = false, length = 32)
    private String number;

    @Column(name = "name", nullable = false, length = 16)
    private String name;

    @Column(name = "birth")
    @Temporal(TemporalType.DATE)
    private Date birth;

}
